﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wfControls="clr-namespace:WhiteFlow.Wpf.Controls.Common;assembly=WhiteFlow.Wpf.Controls"
                    xmlns:controls="clr-namespace:WhiteFlow.DevTrackingTool.UI.Controls">
    
    <Style TargetType="{x:Type controls:MessageDialog}">
        <Setter Property="QuestionIcon" Value="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Icons/MessageDialog/32x32/question.png" />
        <Setter Property="InformationIcon" Value="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Icons/MessageDialog/32x32/information.png" />
        <Setter Property="WarningIcon" Value="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Icons/MessageDialog/32x32/attention.png" />
        <Setter Property="ErrorIcon" Value="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Icons/MessageDialog/32x32/close_delete.png" />
        
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type controls:MessageDialog}">
                    <Grid Name="Root" Visibility="Collapsed" Opacity="0">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup Name="CommonStates">
                                <VisualState Name="Closed" />
                                <VisualState Name="Open">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" 
                                                                       Storyboard.TargetName="Root" 
                                                                       Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation Duration="00:00:00.300"
                                                         To="1"
                                                         Storyboard.TargetName="Root" 
                                                         Storyboard.TargetProperty="Opacity" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        
                        <Border Background="LightGray" Opacity="0.8" />

                        <DockPanel LastChildFill="True" Background="Transparent" VerticalAlignment="Top">
                            <Border Background="{StaticResource ResourceKey=ContentsBgBrush}" 
                                    CornerRadius="0,0,6,6" 
                                    Padding="5"
                                    DockPanel.Dock="Bottom">
                                
                                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                                    <Button x:Name="PART_BtnOk" 
                                            Style="{StaticResource ResourceKey=BorderHoverButtonStyle}"
                                            Content="OK" 
                                            Padding="5,0"
                                            Foreground="White"
                                            FontFamily="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Fonts/#BIRTH OF A HERO"
                                            FontSize="25"
                                            VerticalAlignment="Center" />
                                    <Button x:Name="PART_BtnYes" 
                                            Style="{StaticResource ResourceKey=BorderHoverButtonStyle}"
                                            Content="Yes" 
                                            Margin="5,0,0,0"
                                            Padding="5,0"
                                            Foreground="White"
                                            FontFamily="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Fonts/#BIRTH OF A HERO"
                                            FontSize="25"
                                            VerticalAlignment="Center" />
                                    <Button x:Name="PART_BtnNo" 
                                            Style="{StaticResource ResourceKey=BorderHoverButtonStyle}"
                                            Content="No" 
                                            Margin="5,0,0,0"
                                            Padding="5,0"
                                            Foreground="White"
                                            FontFamily="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Fonts/#BIRTH OF A HERO"
                                            FontSize="25"
                                            VerticalAlignment="Center" />
                                    <Button x:Name="PART_BtnCancel" 
                                            Style="{StaticResource ResourceKey=BorderHoverButtonStyle}"
                                            Content="Cancel" 
                                            Margin="5,0,0,0"
                                            Padding="5,0"
                                            Foreground="White"
                                            FontFamily="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Fonts/#BIRTH OF A HERO"
                                            FontSize="25"
                                            VerticalAlignment="Center" />
                                </StackPanel>

                            </Border>

                            <Border Background="White" 
                                    TextElement.Foreground="Black"
                                    BorderThickness="1,1,1,0"
                                    BorderBrush="{StaticResource ResourceKey=ContentsBgBrush}">
                                <StackPanel Orientation="Vertical">
                                    <TextBlock Text="{TemplateBinding Title}" 
                                               Margin="15,0,0,0" 
                                               FontSize="35" 
                                               Foreground="{StaticResource ResourceKey=BlueFgBrush}" 
                                               FontFamily="/WhiteFlow.DevTrackingTool.UI;Component/Resources/Fonts/#BIRTH OF A HERO" />
                                    
                                    <StackPanel Orientation="Horizontal" Margin="10,30,10,20">
                                        <Border Margin="0,0,20,0">
                                            <wfControls:Bitmap x:Name="PART_Icon" />
                                        </Border>
                                        
                                        <Border>
                                            <TextBlock Text="{TemplateBinding Message}"
                                                       TextWrapping="Wrap"
                                                       FontSize="14"
                                                       VerticalAlignment="Center" />
                                        </Border>
                                    </StackPanel>
                                </StackPanel>
                            </Border>

                        </DockPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    
</ResourceDictionary>